package cn.kow.kmall.core.util;

import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * @Author: lijun
 * @Description:
 * @Date: Created in 2020-05-21 19:52
 * @Modified By:
 */
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {

    public static String format(Date date) {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
        return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().format(formatter);
    }
}
